## set Kubernetes cluster domain where minio is running
##
clusterDomain: cluster.local

## Set default image, imageTag, and imagePullPolicy. mode is used to indicate the
##
image:
  repository: {{ minio_repo }}
  tag: {{ minio_tag }}
  pullPolicy: IfNotPresent

## Set default image, imageTag, and imagePullPolicy for the `mc` (the minio
## client used to create a default bucket).
##
mcImage:
  repository: {{ mc_repo }}
  tag: {{ mc_tag }}
  pullPolicy: IfNotPresent

## minio server mode, i.e. standalone or distributed.
## Distributed Minio ref: https://docs.minio.io/docs/distributed-minio-quickstart-guide
##
mode: standalone

## Additional arguments to pass to minio binary
extraArgs: []

## Update strategy for Deployments
DeploymentUpdate:
  type: RollingUpdate
  maxUnavailable: 0
  maxSurge: 100%

## Update strategy for StatefulSets
StatefulSetUpdate:
  updateStrategy: RollingUpdate

## Pod priority settings
## ref: https://kubernetes.io/docs/concepts/configuration/pod-priority-preemption/
##
priorityClassName: ""

## Set default accesskey, secretkey, Minio config file path, volume mount path and
## number of nodes (only used for Minio distributed mode)
## AccessKey and secretKey is generated when not set
## Distributed Minio ref: https://docs.minio.io/docs/distributed-minio-quickstart-guide
##
existingSecret: ""
accessKey: "openpitrixminioaccesskey"
secretKey: "openpitrixminiosecretkey"
configPath: "/root/.minio/"
configPathmc: "/root/.mc/"
mountPath: "/data"
replicas: 4

## TLS Settings for Minio
tls:
  enabled: false
  ## Create a secret with private.key and public.crt files and pass that here. Ref: https://github.com/minio/minio/tree/master/docs/tls/kubernetes#2-create-kubernetes-secret
  certSecret: ""
  publicCrt: public.crt
  privateKey: private.key

## Enable persistence using Persistent Volume Claims
## ref: http://kubernetes.io/docs/user-guide/persistent-volumes/
##
persistence:
  enabled: true

  ## A manually managed Persistent Volume and Claim
  ## Requires persistence.enabled: true
  ## If defined, PVC must be created manually before volume will be bound
  # existingClaim:

  ## minio data Persistent Volume Storage Class
  ## If defined, storageClassName: <storageClass>
  ## If set to "-", storageClassName: "", which disables dynamic provisioning
  ## If undefined (the default) or set to null, no storageClassName spec is
  ##   set, choosing the default provisioner.  (gp2 on AWS, standard on
  ##   GKE, AWS & OpenStack)
  ##
  ## Storage class of PV to bind. By default it looks for standard storage class.
  ## If the PV uses a different storage class, specify that here.
{% if persistence.storageClass is defined and persistence.storageClass != "" %}
  storageClass: "{{ persistence.storageClass }}"
{% endif %}
  # VolumeName: ""
  accessMode: ReadWriteOnce
  size: {% if minio_storage_pv_size is defined %}{{ minio_storage_pv_size }}{% else %}{{ common.minio.volumeSize | default("20Gi") }}{% endif %}

  ## If subPath is set mount a sub folder of a volume instead of the root of the volume.
  ## This is especially handy for volume plugins that don't natively support sub mounting (like glusterfs).
  ##
  subPath: ""

## Expose the Minio service to be accessed from outside the cluster (LoadBalancer service).
## or access it from within the cluster (ClusterIP service). Set the service type and the port to serve it.
## ref: http://kubernetes.io/docs/user-guide/services/
##

service:
  type: ClusterIP
  clusterIP: ~
  port: 9000
  nodePort: 31311
  # externalIPs:
  #   - externalIp1
  annotations: {}
    # prometheus.io/scrape: 'true'
    # prometheus.io/path:   '/minio/prometheus/metrics'
    # prometheus.io/port:   '9000'

## Configure Ingress based on the documentation here: https://kubernetes.io/docs/concepts/services-networking/ingress/
##

ingress:
  enabled: false
  annotations: {}
    # kubernetes.io/ingress.class: nginx
    # kubernetes.io/tls-acme: "true"
    # kubernetes.io/ingress.allow-http: "false"
    # kubernetes.io/ingress.global-static-ip-name: ""
    # nginx.ingress.kubernetes.io/secure-backends: "true"
    # nginx.ingress.kubernetes.io/backend-protocol: "HTTPS"
    # nginx.ingress.kubernetes.io/whitelist-source-range: 0.0.0.0/0
  path: /
  hosts:
    - chart-example.local
  tls: []
  #  - secretName: chart-example-tls
  #    hosts:
  #      - chart-example.local

## Node labels for pod assignment
## Ref: https://kubernetes.io/docs/user-guide/node-selection/
##
{% if common.minio.nodeSelector is defined and common.minio.nodeSelector is not none %}
nodeSelector:
  {{ common.minio.nodeSelector | to_nice_yaml(indent=2) | indent(2) }}
{% elif nodeSelector is defined and nodeSelector is not none %}
nodeSelector:
  {{ nodeSelector | to_nice_yaml(indent=2) | indent(2) }}
{% else %}
nodeSelector: {}
{% endif %}
{% if common.minio.tolerations is defined and common.minio.tolerations is not none %}
tolerations:
  {{ common.minio.tolerations | to_nice_yaml(indent=2) | indent(2) }}
{% elif tolerations is defined and tolerations is not none %}
tolerations:
  {{ tolerations | to_nice_yaml(indent=2) | indent(2) }}
{% else %}
tolerations: []
{% endif %}
{% if common.minio.affinity is defined and common.minio.affinity is not none %}
affinity:
   {{ common.minio.affinity | to_nice_yaml(indent=2) | indent(2) }}
{% elif affinity is defined and affinity is not none %}
affinity:
  {{ affinity | to_nice_yaml(indent=2) | indent(2) }}
{% else %}
affinity: {}
{% endif %}

# Additational pod annotations
podAnnotations: {}

# Additional pod labels
podLabels: {}

## Liveness and Readiness probe values.
## ref: https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-probes/
readinessProbe:
  initialDelaySeconds: 5
  periodSeconds: 15
  timeoutSeconds: 1
  successThreshold: 1
  failureThreshold: 3

## Configure resource requests and limits
## ref: http://kubernetes.io/docs/user-guide/compute-resources/
##
resources:
  requests:
    memory: 256Mi
    cpu: 250m

## Create a bucket after minio install
##
defaultBucket:
  enabled: false
  ## If enabled, must be a string with length > 0
  name: bucket
  ## Can be one of none|download|upload|public
  policy: none
  ## Purge if bucket exists already
  purge: false

## Create multiple buckets after minio install
## Enabling `defaultBucket` will take priority over this list
##
buckets:
   - name: app-store
     policy: none
     purge: false
   - name: s2i-binaries
     policy: none
     purge: false

s3gateway:
  enabled: false
  replicas: 4
  serviceEndpoint: ""

## Use minio as an azure blob gateway, you should disable data persistence so no volume claim are created.
## https://docs.minio.io/docs/minio-gateway-for-azure
azuregateway:
  enabled: false
  # Number of parallel instances
  replicas: 4

## Use minio as GCS (Google Cloud Storage) gateway, you should disable data persistence so no volume claim are created.
## https://docs.minio.io/docs/minio-gateway-for-gcs

gcsgateway:
  enabled: false
  # Number of parallel instances
  replicas: 4
  # credential json file of service account key
  gcsKeyJson: ""
  # Google cloud project-id
  projectId: ""

ossgateway:
  enabled: false
  # Number of parallel instances
  replicas: 4
  endpointURL: ""

## Use minio on NAS backend
## https://docs.minio.io/docs/minio-gateway-for-nas

nasgateway:
  enabled: false
  # Number of parallel instances
  replicas: 4
  # For NAS Gateway, you may want to bind the PVC to a specific PV. To ensure that happens, PV to bind to should have
  # a label like "pv: <value>", use value here.
  pv: ~

## Use this field to add environment variables relevant to Minio server. These fields will be passed on to Minio container(s)
## when Chart is deployed
environment:
  ## To disable Minio Browser, set this value to off
  MINIO_BROWSER: "on"
  ## To enable virtual-host-style requests, set this value to Minio host domain name.
  # MINIO_DOMAIN: ""
  ## Minio Cache settings, refer: https://docs.minio.io/docs/minio-disk-cache-guide.html
  # MINIO_CACHE_DRIVES: ""
  # MINIO_CACHE_EXCLUDE: ""
  # MINIO_CACHE_EXPIRY: ""
  # MINIO_CACHE_MAXUSE: ""
  ## Minio WORM setting, refer: https://docs.minio.io/docs/minio-server-configuration-guide.html
  # MINIO_WORM: ""
  ## Minio KMS settings, refer: https://docs.minio.io/docs/minio-kms-quickstart-guide.html
  # MINIO_SSE_VAULT_ENDPOINT: ""
  # MINIO_SSE_VAULT_APPROLE_ID: ""
  # MINIO_SSE_VAULT_APPROLE_SECRET: ""
  # MINIO_SSE_VAULT_KEY_NAME: ""
  ## Minio Federation settings, refer: https://docs.minio.io/docs/minio-federation-quickstart-guide.html
  # MINIO_ETCD_ENDPOINTS: ""
  # MINIO_PUBLIC_IPS: ""
  # MINIO_DOMAIN: ""
  ## Add other environment variables relevant to Minio server here. These values will be added to the container(s) as this Chart is deployed

networkPolicy:
  enabled: false
  allowExternal: true

## Specify the service account to use for the Minio pods. If 'create' is set to 'false'
## and 'name' is left unspecified, the account 'default' will be used.
serviceAccount:
  create: true
  ## The name of the service account to use. If 'create' is 'true', a service account with that name
  ## will be created. Otherwise, a name will be auto-generated.
  name: ks-minio

metrics:
  # Metrics can not be disabled yet: https://github.com/minio/minio/issues/7493
  serviceMonitor:
    enabled: false
    additionalLabels: {}
    # namespace: monitoring
    # interval: 30s
    # scrapeTimeout: 10s
